<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>事件处理-作业2</title>
</head>
<body>
<div id="app">
    <h1>{{message}}</h1>
    请输入书名: <input type="text" v-model="bookName">
    <button v-on:click="show">点击显示书名~</button>
</div>
<script src="vue.js"></script>
<script>
    let vm = new Vue({
        el: "#app",
        data:{
            message: "Vue事件处理的作业",
            bookName: "天龙八部"
        },
        methods:{
            show(){
                alert("你输入的书名是:" + this.bookName);
            }
        }
    })
</script>
</body>
</html>